package com.lxg.spring.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestEndPointController {
    @RequestMapping("/a/getByOauth")
    public String getByOauth(){
        return "getByOauth";
    }

    @RequestMapping("/a/getByNoOauth")
    public String getByNoOauth(){
        return "getByNoOauth";
    }

    @RequestMapping(value = "/b/getBNo")
    public String getBNo(){
        return "getBNo";
    }

    @PreAuthorize("hasRole('USER')")
    @RequestMapping(value = "/b/getBOauth")
    public String getBOauth(){
        return "getBOauth";
    }
}
